package com.cebbank.yyi.auto;

import com.cebbank.yyi.impl.Impl;
import com.cebbank.yyi.properties.ConnectionProperties;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.sql.Driver;

/**
 * @description:
 * @author: yyi
 * @date: 2022/8/25 11:01
 * @version: 1.0
 **/
@Configuration
@EnableConfigurationProperties(ConnectionProperties.class)
@ConditionalOnClass({Driver.class, Impl.class})
public class DbConfiguration {
    @Bean
    public Impl getImpl() {
        return new Impl();
    }
}
